package com.srcptit.java.training.kienbd.bt1;
import java.util.Scanner;
import java.lang.Math;
public class Muc1_Bai4_N_SNT_DT {
	static int m;
	static void nhap(){
            Scanner sc=new Scanner(System.in);
            System.out.print("Nhap so : ");
            m=sc.nextInt();
            sc.close();
	}
	static int snt(int n)
        {
            for(int i=2;i<=Math.sqrt(n);i++)
            if(n%i==0)	return 0;
            return 1;
	}
	public static void n_snt_dau_tien()
	{
            System.out.print("2 ");
            int dem=1, i=3;
            while(dem<m)
            {
		if(snt(i)==1) {System.out.print(i+" ");dem++;}
		i+=2;
            }
	}
	public static void main(String args[]){
            nhap();
            n_snt_dau_tien();
	}
}
